/**
 * 商品详情页
 *
 * 作者 admin
 * 日期 2024-07-29 14:19:05
 */
layui.use(['jquery','febs', 'form','commonJS','fileUpload'], function () {
    var $ = layui.$,
        form = layui.form,
        fileUpload = layui.fileUpload;

    form.render();

    var fileUploadDiv = fileUpload.render({
        elem: '#fileUpload',
        url: ctx + 'hazard/upload',
        type: 0,//0-图片，1-视频，2-其他
        maxNum:1,
        defaultData: getFileList(),
        isDetail: true,
        done: function (res) {
        },
    });

    function getFileList(){
        var fileList = [];
        if(goods){
            let file = {
                fileName:goods.fileName,
                filePath:goods.filePath,
                smallPath:goods.smallPath
            }
            fileList.push(file)
        }
        return fileList;
    }


});